package org.testis.gui.mvc.model.dynamicmap;

import org.testis.gui.mvc.model.*;
import org.testis.gui.mvc.controller.dynamicmap.LoadDynamicMapController;


/**
 *
 * @author Cahit Emir Erel
 */
public class LoadDynamicMapModel extends AbstractModel
{

    private Boolean m_loaderVisibility = false;
    private String m_description = "";
    private String m_dut = "";
    private String m_firmware = "";


    public String getFirmware()
    {
        return m_firmware;
    }


    public void setFirmware(String firmware)
    {
        if (firmware == null) {
            firmware = "";
        }
        String oldFirmware = m_firmware;
        m_firmware = firmware;
        firePropertyChange(LoadDynamicMapController.SELECT_FIRMWARE,
                           oldFirmware,
                           firmware);
    }


    public void setLoaderVisibility(Boolean loaderVisibility)
    {
        if (loaderVisibility == null) {
            return;
        }
        Boolean oldLoaderVisibility = m_loaderVisibility;
        m_loaderVisibility = loaderVisibility;
        firePropertyChange(LoadDynamicMapController.SHOW_LOADER,
                           oldLoaderVisibility,
                           loaderVisibility);
    }


    public Boolean getLoaderVisibility()
    {
        return m_loaderVisibility;
    }


    public void setDescription(String description)
    {
        if (description == null) {
            description = "";
        }
        String oldDescription = m_description;
        m_description = description;
        firePropertyChange(LoadDynamicMapController.SHOW_DESCRIPTION,
                           oldDescription,
                           description);
    }


    public String getDescription()
    {
        return m_description;
    }


    public String getDut()
    {
        return m_dut;
    }


    public void setDut(String dut)
    {
        if (dut == null) {
            dut = "";
        }
        String oldDut = m_dut;
        m_dut = dut;
        firePropertyChange(LoadDynamicMapController.SELECT_DUT,
                           oldDut,
                           dut);
    }
}
